import { ITodoData } from "./typings";

class TodoTemplate {
  protected todoView ({id, content, complete}: ITodoData): string {
    return `
      <input type="checkbox" ${ complete && "checked"} data-id="${ id }" />
      <span style="text-decoration: ${complete ? 'line-through' : 'none'}">${ content }</span>
      <button data-id="${ id }">删除</button>
    `
  }
}

export default TodoTemplate